/*
Navicat MySQL Data Transfer

Source Server         : mysql
Source Server Version : 50716
Source Host           : localhost:3306
Source Database       : thinkphp

Target Server Type    : MYSQL
Target Server Version : 50716
File Encoding         : 65001

Date: 2017-12-28 16:46:47
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for think_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group`;
CREATE TABLE `think_auth_group` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`title`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`status`  tinyint(1) NOT NULL DEFAULT 1 ,
`rules`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=4

;

-- ----------------------------
-- Records of think_auth_group
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group` VALUES ('1', '高级管理员', '1', '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28'), ('2', '管理员', '1', '1,2,3,4,5,8,11,12,13,26'), ('3', '普通用户', '1', '1,3,4');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group_access`;
CREATE TABLE `think_auth_group_access` (
`uid`  mediumint(8) UNSIGNED NOT NULL ,
`group_id`  mediumint(8) UNSIGNED NOT NULL ,
UNIQUE INDEX `uid_group_id` (`uid`, `group_id`) USING BTREE ,
INDEX `uid` (`uid`) USING BTREE ,
INDEX `group_id` (`group_id`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci

;

-- ----------------------------
-- Records of think_auth_group_access
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group_access` VALUES ('1', '1'), ('2', '2'), ('3', '3'), ('4', '3'), ('5', '3'), ('6', '3'), ('7', '3'), ('8', '3'), ('9', '3'), ('10', '3'), ('11', '3'), ('12', '3'), ('13', '3'), ('14', '3'), ('15', '3'), ('16', '3'), ('17', '3'), ('18', '3');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_rule`;
CREATE TABLE `think_auth_rule` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`title`  char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`type`  tinyint(1) NOT NULL DEFAULT 1 ,
`status`  tinyint(1) NOT NULL DEFAULT 1 ,
`condition`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`pid`  int(8) NULL DEFAULT NULL ,
`is_menu`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
UNIQUE INDEX `name` (`name`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=30

;

-- ----------------------------
-- Records of think_auth_rule
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_rule` VALUES ('1', 'home/user/index', '用户信息', '1', '1', '', '0', '1'), ('2', '', '用户管理', '1', '1', '', '0', '1'), ('3', 'home/user/info', '个人信息', '1', '1', '', '1', '1'), ('4', 'home/user/updatepwd', '修改密码', '1', '1', '', '1', '1'), ('5', 'home/user/items', '用户列表', '1', '1', '', '2', '1'), ('6', 'home/user/role', '角色管理', '1', '1', '', '2', '1'), ('7', 'home/user/auth', '权限管理', '1', '1', '', '2', '1'), ('8', 'home/user/itemsdb', '用户列表数据', '1', '1', '', '5', '0'), ('9', 'home/user/addUserinfo', '新增用户', '1', '1', '', '5', '0'), ('10', 'home/user/updateUserinfo', '编辑用户', '1', '1', '', '5', '0'), ('11', 'home/user/delUserinfo', '删除用户', '1', '1', '', '5', '0'), ('12', 'home/user/leftRole', '角色管理左表', '1', '1', '', '6', '0'), ('13', 'home/user/rightRole', '角色管理右表', '1', '1', '', '6', '0'), ('14', 'home/user/leftAuth', '权限管理左表', '1', '1', '', '7', '0'), ('15', 'home/user/rightAuth', '权限管理右表', '1', '1', '', '7', '0'), ('16', 'home/user/addRole', '新增角色', '1', '1', '', '6', '0'), ('17', 'home/user/delRole', '删除角色', '1', '1', '', '6', '0'), ('18', 'home/user/updateRole', '修改角色', '1', '1', '', '6', '0'), ('19', 'home/user/updateAuth', '修改权限', '1', '1', '', '7', '0'), ('20', 'home/user/ItemAuth', '角色对应的权限', '1', '1', '', '7', '0'), ('21', 'home/user/addAuth', '添加权限', '1', '1', '', '7', '0'), ('22', 'home/user/getAuth', '获取权限', '1', '1', '', '7', '0'), ('23', 'home/user/getRules', '获取所有的规则', '1', '1', '', '7', '0'), ('24', 'home/user/loadRole', '加载角色', '1', '1', '', '6', '0'), ('25', 'home/user/userCount', '用户总数', '1', '1', '', null, '0'), ('26', 'home/user/Rules', '规则', '1', '1', '', '7', '0'), ('27', 'home/user/itemRole', '用户对应的角色', '1', '1', '', '6', '0'), ('28', 'home/user/roleList', '角色右表所有数据', '1', '1', '', null, null), ('29', 'home/user/authList', '', '1', '1', '', null, null);
COMMIT;

-- ----------------------------
-- Table structure for think_member
-- ----------------------------
DROP TABLE IF EXISTS `think_member`;
CREATE TABLE `think_member` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`username`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`password`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`email`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`address`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`birthday`  date NULL DEFAULT NULL ,
`phone`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`sex`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`status`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' ,
`img`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`creat_time`  datetime NULL DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=20

;

-- ----------------------------
-- Records of think_member
-- ----------------------------
BEGIN;
INSERT INTO `think_member` VALUES ('1', '张三', '96e79218965eb72c92a549dd5a330112', '1244057198@qq.com', '北京', '1996-02-14', '182-3456-2312', '男', '1', '/Public/dist/img/user1-128x128.jpg', null), ('2', '李四', 'e10adc3949ba59abbe56e057f20f883e', '1119780260@qq.com', '天津', '1993-12-13', '155-2233-2243', '男', '1', '/Public/dist/img/user2-160x160.jpg', null), ('3', '王五', 'e10adc3949ba59abbe56e057f20f883e', '1021729841@qq.com', '天津', '1993-06-21', '189-7777-6567', '女', '1', '/Public/dist/img/user3-128x128.jpg', '2017-12-11 16:12:12'), ('4', '赵六', 'e10adc3949ba59abbe56e057f20f883e', '1399480075@qq.com', '北京', '2006-11-24', '139-9480-0875', '男', '1', '/Public/dist/img/user4-128x128.jpg', '2017-12-27 16:10:05'), ('5', '李莉', 'e10adc3949ba59abbe56e057f20f883e', '71272136472@qq.com', '北京', '1994-08-09', '187-3584-6817', '女', '1', '/Public/dist/img/user2-160x160.jpg', null), ('6', '王珞丹', 'e10adc3949ba59abbe56e057f20f883e', '43632623513@qq.com', '四川', '1984-01-30', '182-2267-2033', '女', '1', '/Public/dist/img/user5-128x128.jpg', null), ('7', '乔振宇', 'e10adc3949ba59abbe56e057f20f883e', '16816476463@qq.com', '陕西', '1978-11-01', '155-2033-2012', '男', '1', '/Public/dist/img/user6-128x128.jpg', null), ('8', '王宁', 'e10adc3949ba59abbe56e057f20f883e', '1119780249@qq.com', '陕西', '1998-09-21', '187-7762-7627', '男', '1', '/Public/dist/img/user7-128x128.jpg', null), ('9', '李雪丽', 'e10adc3949ba59abbe56e057f20f883e', '1021729876@qq.com', '河北', '1992-01-23', '139-9989-2912', '女', '1', '/Public/dist/img/user8-128x128.jpg', null), ('10', '安静', 'e10adc3949ba59abbe56e057f20f883e', '1264937198@qq.com', '四川', '1997-02-12', '133-2233-2143', '女', '1', '/Public/dist/img/user2-160x160.jpg', null), ('11', '暴力', 'e10adc3949ba59abbe56e057f20f883e', '18273367238@qq.com', '河北', '1993-12-13', '182-2243-2267', '男', '1', '/Public/dist/img/user2-160x160.jpg', null), ('12', '李诗琪', 'e10adc3949ba59abbe56e057f20f883e', '13747657575@qq.com', '天津', '1996-11-02', '152-2238-0876', '女', '1', '/Public/dist/img/user2-160x160.jpg', null), ('13', '曹曦月', 'e10adc3949ba59abbe56e057f20f883e', '12640336752@qq.com', '湖南', '1998-04-12', '193-3328-6795', '女', '1', '/Public/dist/img/user2-160x160.jpg', null), ('14', '董璇', 'e10adc3949ba59abbe56e057f20f883e', '13743742567@qq.com', '黑龙江', '1982-11-05', '176-4276-4783', '女', '1', '/Public/dist/img/user2-160x160.jpg', null), ('15', '符泽宇', 'e10adc3949ba59abbe56e057f20f883e', '23142533355@qq.com', '浙江', '2000-12-13', '182-2208-2932', '男', '1', '/Public/dist/img/user2-160x160.jpg', null), ('16', '高畅', 'e10adc3949ba59abbe56e057f20f883e', '13215354433@qq.com', '江苏', '1971-09-23', '152-2232-4315', '女', '1', '/Public/dist/img/user2-160x160.jpg', null), ('17', '张倩倩', 'e10adc3949ba59abbe56e057f20f883e', '13124354341@qq.com', '陕西', '1999-05-12', '182-2256-7487', '女', '1', '/Public/dist/img/user2-160x160.jpg', null), ('18', '高筱琴', 'e10adc3949ba59abbe56e057f20f883e', '14325345435@qq.com', '广州', '1992-07-01', '176-2342-3234', '女', '1', '/Public/dist/img/user2-160x160.jpg', null);
COMMIT;

-- ----------------------------
-- Auto increment value for think_auth_group
-- ----------------------------
ALTER TABLE `think_auth_group` AUTO_INCREMENT=4;

-- ----------------------------
-- Auto increment value for think_auth_rule
-- ----------------------------
ALTER TABLE `think_auth_rule` AUTO_INCREMENT=30;

-- ----------------------------
-- Auto increment value for think_member
-- ----------------------------
ALTER TABLE `think_member` AUTO_INCREMENT=20;
